function wCoreComponent(config) {
  const { wCore } = getApp();
  const { pageLifetimes = {}, initData = [], watchData = {} } = config;
  const { show: _show, hide: _hide } = pageLifetimes;
  let { data = {} } = config;


  function show() {
    if (typeof watchData === 'object') {
      console.log("组件执行属性监听");
      doWatchData();
    }
    if (typeof _show === 'function') {
      _show.call(this);
    }
  }

  function hide() {
    if (typeof _hide === 'function') {
      _hide.call(this);
    }
  }


  return Component({
    ...config,
    data,
    show,
    hide,
    dispatch,
    getState,
    pageLifetimes: { ...pageLifetimes, show, hide }
  });
}
module.exports = wCoreComponent;